<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>title here</title>
<link type="text/css" rel="stylesheet" href="../js/YUI/fonts/fonts.css" />
<link type="text/css" rel="stylesheet" href="../js/YUI/reset/reset.css" />
<link type="text/css" rel="stylesheet" href="../js/YUI/container/assets/container.css" />
<link type="text/css" rel="stylesheet" href="../js/YUI/menu/assets/menu.css" />

<script type="text/javascript" src="../js/YUI/yahoo/yahoo.js"></script>
<script type="text/javascript" src="../js/YUI/yahoo-dom-event/yahoo-dom-event.js"></script>
<script type="text/javascript" src="../js/YUI/dragdrop/dragdrop.js" ></script>
<script type="text/javascript" src="../js/YUI/container/container.js"></script>
<script type="text/javascript" src="../js/YUI/treeview/treeview.js"></script>
<script type="text/javascript" src="../js/YUI/menu/menu.js"></script>

<link type="text/css" rel="stylesheet" href="../js/tabletree/menu/menu.css" />
<link type="text/css" rel="stylesheet" href="tabletree.css" />
<script type="text/javascript" src="../js/tabletree/tabletree.js"></script>

<link type="text/css" rel="stylesheet" href="unitbeta.css" />	
<script type="text/javascript" src="script/tt.js"></script>
<script>

YAHOO.util.Event.onAvailable("treeDiv", buildTree, oConfigsWithCheckbox);
function update(){
	tree.addOrUpdateNode({code:"001",name:"Modified", checked:true});
}
function add(){
	tree.addOrUpdateNode({code:"004",  name:"new", checked:true}, tree.getRoot());
}
function getAllDatas(){
	alert(tree.getAllDatas());
}
function getAllNodes(){
	alert(tree.getAllNodes());
}
function removeAllNodes(){
	tree.removeChildren(tree.getRoot());
	tree.getRoot().refresh();
}
function resetCheckbox(){
	tree.resetCheckbox();
}

function changeSchema(){
	tree.changeSchema(["code", "checked"]);
}


</script>
</head>

<body> 
<div id="warpper">
	<div id="content">
		<div id="treeDiv" class="leftarea"></div>
		<div id="status" style="float:right;">
		</div>
		
	</div>
</div>
<div style="float:right;">
			<button onclick="buildTree(oConfigs);">No Checkbox</button>
			<button onclick="buildTree(oConfigsWithCheckbox);">Checkbox</button>
			<button onclick="add();">add Node</button>
			<button onclick="update();">Update Node</button>
			<button onclick="getAllNodes()">getAllNodes</button>
			<button onclick="getAllDatas()">get Data of All Nodes </button>
			<button onclick="removeAllNodes()">remove All Nodes</button>
			<button onclick="changeSchema()">changeSchema</button>
			<button onclick="resetCheckbox()">reset checkboxes</button>
		</div>
</body>
</html>
